package com.woldier.base.utils;

public class UserHolder {
    private static final ThreadLocal<String> tl = new ThreadLocal<>();
    /**
     * 获取登录的信息
     * @return
     */
    public static String getTokenUser() {

        return tl.get();
    }
    public static void setUser(String s){
        tl.set(s);
    }

    /**
     * 每次调用结束必须调用这个函数，否则会导致内存泄露
     */
    public static void remove(){tl.remove();}
}
